<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/demo/outsourcing_units/outsourcing_units.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/demo/outsourcing_units/outsourcing_units.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'id',
                footer: "Foots",
                cnName: '外协单位管理',
                name: 'outsourcing_units/outsourcing_units',
                url: "/outsourcing_units/",
                sortName: "CreateTime"
            });
            const editFormFields = ref({"Outsourcing_Unit_Name":"","Mobile_Phone":"","Email":"","Outsourcing_Address":"","Fixed_Phone":"","Remarks":""});
            const editFormOptions = ref([[{"title":"外协单位名称","required":true,"field":"Outsourcing_Unit_Name"}],
                              [{"title":"手机号码","field":"Mobile_Phone"}],
                              [{"title":"邮箱地址","field":"Email"}],
                              [{"title":"外协单位地址","field":"Outsourcing_Address"}],
                              [{"title":"固定电话","field":"Fixed_Phone"}],
                              [{"title":"备注信息","field":"Remarks"}]]);
            const searchFormFields = ref({"Outsourcing_Unit_Name":"","Mobile_Phone":""});
            const searchFormOptions = ref([[{"title":"外协单位名称","field":"Outsourcing_Unit_Name","type":"like"},{"title":"手机号码","field":"Mobile_Phone","type":"like"}]]);
            const columns = ref([{field:'id',title:'自增主键，通常为UUID或其他唯一标识符',type:'string',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Outsourcing_Unit_Name',title:'外协单位名称',type:'string',width:220,require:true,align:'left',sort:true},
                       {field:'Mobile_Phone',title:'手机号码',type:'string',width:110,align:'left'},
                       {field:'Email',title:'邮箱地址',type:'string',width:220,align:'left'},
                       {field:'Outsourcing_Address',title:'外协单位地址',type:'string',width:220,align:'left'},
                       {field:'Fixed_Phone',title:'固定电话',type:'string',width:110,align:'left'},
                       {field:'Remarks',title:'备注信息',type:'string',width:220,align:'left'},
                       {field:'ISDel',title:'逻辑删除字段，0表示未删除，1表示已删除',type:'int',width:110,hidden:true,align:'left'},
                       {field:'CreateName',title:'创建人',type:'string',width:110,align:'left'},
                       {field:'CreateTime',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'UpdateName',title:'修改人',type:'string',width:110,align:'left'},
                       {field:'UpdateTime',title:'修改时间',type:'datetime',width:150,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
